package com.sj.purchase.modules.cost.domain.order;

import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;

/**
 * 出库订单表
 * Created by icodebug on 17-7-15.
 */
@Entity
@Table(name = "t_out_order")
public class OutOrder extends Order {

    private String shopName;//店铺

    private String buyerName;//买家姓名

    private Double payment;//销售价（实际付款价格）

    @OneToMany(mappedBy = "order", fetch = FetchType.EAGER, orphanRemoval = true, cascade = CascadeType.ALL)
    private Set<OutOrderItem> orderItems = new HashSet<>();

    public String getShopName() {
        return shopName;
    }

    public OutOrder setShopName(String shopName) {
        this.shopName = shopName;
        return this;
    }

    public String getBuyerName() {
        return buyerName;
    }

    public OutOrder setBuyerName(String buyerName) {
        this.buyerName = buyerName;
        return this;
    }

    public Double getPayment() {
        return payment;
    }

    public OutOrder setPayment(Double payment) {
        this.payment = payment;
        return this;
    }

    public Set<OutOrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(Set<OutOrderItem> orderItems) {
        this.orderItems = orderItems;
    }
}
